﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <link href="~/Content/static/h-ui/css/H-ui.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/css/style.css" />
    <meta name="viewport" content="width=device-width" />
    <style>
        #reault {
        cursor:not-allowed; 
        }
    </style>
    <title>组卷策略添加</title> 
    <script>
    $(function () {

    });
    //求总分
    function sum() {

        //单选数量
        var RadioCount = $("input[name='RadioCount']").val();
        //单选分数
        var RadioScore = $("input[name='RadioScore']").val();
        //多选数量
        var CheckCount = $("input[name='CheckCount']").val();
        //多选分数
        var CheckScore = $("input[name='CheckScore']").val();
        //判断数量
        var JudgeCount = $("input[name='JudgeCount']").val();
        //判断分数
        var JudgeScores = $("input[name='JudgeScores']").val();
        var reault = parseFloat(RadioCount * RadioScore) + parseFloat(CheckCount * CheckScore) + parseFloat(JudgeCount * JudgeScores);
        //value = value.replace(/[^\d.]/g, '')
        $("input[name='reault']").val(parseFloat(reault));
        if (parseFloat(reault) > parseFloat(100)) {

            $("#submit").removeClass();
            $("#submit").addClass("btn disabled radius");
        }
        if ($("#reault").val() <= parseFloat(100)) {

            $("#submit").removeClass()
            $("#submit").addClass("btn btn-primary radius");
        }
    }
    </script>
</head>
<body>
    <div>
        @using (Html.BeginForm("AddStrategy", "SysUserInfo", FormMethod.Post))
        {
        <div>
            <table class="table table-container radius" style="width:500px;">
                <tr>
                    <td class="text-r">学院：</td>
                    <td>
                        <select id="College" name="CollegeID" onchange="changeTie() " class="select" style="width:100px;"></select>
                    </td>
                </tr>
                <tr>
                    <td class="text-r">系：</td> 
                    <td> 
                        <select id="Tie" name="TieID" onchange="changephasetable() " class="select" style="width:100px;"></select> 
                    </td> 
                </tr>  
                <tr> 
                    <td class="text-r">阶段：</td> 
                    <td> 
                        <select id="phasetable" name="PhaseID" class="select" style="width:100px;"></select> 
                    </td> 
                </tr> 
                <tr> 
                    <td class="text-r">策略名称：</td> 
                    <td> 
                        <input type="text" placeholder="策略名称" class="input-text radius" name="TPStrategy_Name" /> 
                    </td> 
                </tr> 
                <tr> 
                    <td rowspan="5" class="text-r">考题类型及数量：</td>  
                </tr> 
                <tr> 
                    <td> 
                        单选题&nbsp;数量：<input type="number" name="RadioCount" value="" placeholder="单选数量" class="input-text radius" style="width:90px" min="1" max="50" onkeyup="sum()" />
                        &nbsp;分数：<input type="text" name="RadioScore" value="" placeholder="单选分数" class="input-text radius" style="width:90px" min="1" max="50" onblur="value = value.replace(/[^\d.]/g, '')" onkeyup="    sum()" /> 
                    </td> 
                <tr> 
                    <td> 
                        多选题&nbsp;数量：<input type="number" name="CheckCount" value="" placeholder="多选数量" class="input-text radius" style="width:90px" min="1" max="50" onkeyup="sum()" /> 
                        &nbsp;分数：<input type="text" name="CheckScore" value="" placeholder="多选分数" class="input-text radius" style="width:90px" min="1" max="50" onblur="value = value.replace(/[^\d.]/g, '')" onkeyup="sum()"/> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        判断题&nbsp;数量：<input type="number" name="JudgeCount" value="" placeholder="判断数量" class="input-text radius" style="width:90px" min="1" max="50" onkeyup="sum()" /> 
                        &nbsp;分数：<input type="text" name="JudgeScores" value="" placeholder="判断分数" class="input-text radius" style="width:90px"  min="1" max="50" onkeyup="sum()" onblur="value = value.replace(/[^\d.]/g, '')" /> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        总分：<input type="number" id="reault" name="reault" value="" placeholder="总分数" class="input-text radius" style="width:200px" readonly  /><label>MAX100</label> 
                    </td> 
                </tr> 
                <tr class="text-c"> 
                    <td colspan="2"> 
                        <input id="submit" type="submit" value="提交" class="btn disabled radius" style="width:120px;" />  
                    </td>
                </tr>
            </table>
        </div>
        }
    </div>
    <!--_footer 作为公共模版分离出去-->
    <script type="text/javascript" src="~/Content/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="~/Content/lib/layer/2.4/layer.js"></script>

    <script src="~/Content/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="~/Content/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
    <!--请在下方写此页面业务相关的脚本-->
   <!--<script type="text/javascript" src="~/Content/lib/jquery.contextmenu/jquery.contextmenu.r2.js"></script>-->
    <script src="~/JS/TestPaperJS.js"></script>
</body>
</html>
